#pragma once

#include "pch.h"
#include "seHero.h"
#include "seScore.h"
#include "seEgg.h"
#include "seLifes.h"
#include "seHighscore.h"
#include "seMainMenu.h"
#include "seMenuHero.h"
#include "seDoor.h"

class seGame
{
private:
	seHero mHeroSad;
	seHero mHeroHappy;
	seDoor mDoorSad;
	seDoor mDoorHappy;
	seMenuHero mMenuHeroSad;
	seMenuHero mMenuHeroHappy;
	seScore mScore,mCombo;
	seHighscore mHighscore;
	seLifes mLifes;
	std::vector<seEgg> mEggsVec;
	seMainMenu mMainMenu;
public: 
	sf::Image mBackgroundHappy, mBackgroundSad, mComboFox, mStoneH, mStoneS;
	sf::Sprite mBackgroundSpriteHappy, mBackgroundSpriteSad, mComboFoxSprite, mSpriteStoneH,mSpriteStoneS;
	sf::Image mEggText[4];
	sf::Sprite mEggSprite[4];
	sf::Image mCircleImage;
	int lives;
	int combo;
	int basicScores;
	float eggsSpeed;
	int iterator;
	float eggTimer;
	float eggRespawnTime;
	int actualWord;
	bool inDoor;
	bool changeWordP1,changeWordP2,checkJoinVar;
	float opacity, opacityChange;
	enum GameState { Uninitialized, ShowingSplash, Paused, 
          ShowingMenu, ShowingScores, Playing, Exiting, ShowingDemo, ShowingAnimation };
	void CreateEgg(int type);
	void CheckColisions();
	void CheckComboFox(sf::Sprite foxSprite);
	bool CheckJoin();
	void ShowMenu();
	void ShowScores();
	void ShowDemo();
	void ShowAnimation();
	void Load();
	void Init();
	void Step();
	void Draw();
};